From 060e2a2329b4d8f30a545ae3d4d519f6d1b7cf61 Mon Sep 17 00:00:00 2001 From: justbur Date: Tue, 21 Jul 2015 21:21:45 -0400 Subject: [PATCH] Fix a default regexp --- README.org | 2 +- which-key.el | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.org b/README.org index d282a94a48a..26a507f47da 100644 --- a/README.org +++ b/README.org @@ -252,7 +252,7 @@ descriptions directly. The relevant variables are Here's an example of one of the default key replacements #+BEGIN_SRC emacs-lisp -("<\\(\\(C-\\|M-\\)*.+\\)>" . "\\1") +("<\\([[:alnum:]-]+\\)>" . "\\1") #+END_SRC The =car= takes a string which may use emacs regexp and the =cdr= takes a string diff --git a/which-key.el b/which-key.el index 865712e4caa..e128302dcf8 100644 --- a/which-key.el +++ b/which-key.el @@ -79,7 +79,7 @@ of the which-key popup." :type 'integer) (defcustom which-key-key-replacement-alist - '(("<\\(\\(C-\\|M-\\)*.+\\)>" . "\\1") ("left" . "←") ("right" . "→")) + '(("<\\([[:alnum:]-]+\\)>" . "\\1") ("left" . "←") ("right" . "→")) "The strings in the car of each cons are replaced with the strings in the cdr for each key. Elisp regexp can be used as in the first example." -- 2.30.2